﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;  

namespace KBC_Quiz_Show.Presentation
{
    public partial class FrmReportPlayer : DevComponents.DotNetBar.Office2007RibbonForm
    {
        public FrmReportPlayer()
        {
            InitializeComponent();
        }

        //private void FrmReportPlayer_Load(object sender, EventArgs e)
        //{
        //    ReportDocument cryRpt = new ReportDocument();
        //    cryRpt.Load(@"C:\Documents and Settings\Qu@n Bom\My Documents\Visual Studio 2008\Projects\Example\Example\CrystalReport1.rpt");
        //    crystalReportViewer1.ReportSource = cryRpt;
        //    crystalReportViewer1.Refresh();  


            
        //}

       
        

        private void buttonX1_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            ReportDocument cryRpt = new ReportDocument();
            cryRpt.Load(@"C:\Users\HUYPV\Desktop\New folder\DoAn_Final_02\KBC Quiz Show\KBC Quiz Show\Report\CrystalReport1.rpt");
            crystalReportViewer1.ReportSource = cryRpt;
            crystalReportViewer1.Refresh();  
        }

        //private void buttonX1_Click(object sender, EventArgs e)
        //{
        //    try
        //    {
        //        ExportOptions CrExportOptions;
        //        DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
        //        PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
        //        CrDiskFileDestinationOptions.DiskFileName = "C:\\test.pdf";
        //        CrExportOptions = crystalReportViewer1.ExportOptions;
        //        {
        //            CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
        //            CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
        //            CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
        //            CrExportOptions.FormatOptions = CrFormatTypeOptions;
        //        }
        //        crystalReportViewer1.Export();
        //    }
        //    catch (Exception ex)
        //    {
        //        MessageBox.Show(ex.ToString());
        //    }
        //}
    }
}
